package com.cookman.assets;

import com.badlogic.gdx.graphics.g2d.TextureAtlas;

import java.util.HashMap;

/**
 * Created by Cookman on 08.02.2015.
 */
public class BaseStorage implements AssetStorage {

    protected HashMap<String, TextureAtlas.AtlasRegion> atlasMap = new HashMap<String, TextureAtlas.AtlasRegion>();

    @Override
    public TextureAtlas.AtlasRegion getRegion(String key) throws Exception{
        if(atlasMap.containsKey(key)){
            return atlasMap.get(key);
        }
        throw new Exception("AtlasRegion not found: "+key);
    }
}
